window.onload = function() {
    var links = document.querySelectorAll('.hotwords a')
    var news = document.querySelectorAll('.news')
    for(var i = 0; i < links.length; i ++) {
        links[i].setAttribute('index', i);
        links[i].onclick = function() {
            var index = this.getAttribute('index');
            for(var i = 0; i < links.length; i ++) {
                news[i].style.display = 'none';
            }
            news[index].style.display = 'block';
        }
    }
}
